package hcn.protocol.ods.report;

import com.fasterxml.jackson.annotation.JsonGetter;
import com.fasterxml.jackson.annotation.JsonIgnore;

import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 * Created by jinxin on 2016/7/14.
 */
@XmlRootElement(name = "detail")
public class LabPlantDetailBean {

    private String plantResultNo;   //培养结果流水号
    private InnerBean lab;
    private InnerBean plantType;    //细菌培养类型
    private String medium;          //培养基
    private String plantCondition;  //培养条件
    private String plantTime;       //培养时间
    private String findMethod;      //观察方法
    private String plantResult;     //培养结果
    private String resultType;      //定性结果
    private String unusualFlag;
    private String crisisFlag;
    private String crisisDesc;


    public String getPlantResultNo() {
        return plantResultNo;
    }

    public void setPlantResultNo(String plantResultNo) {
        this.plantResultNo = plantResultNo;
    }

    @JsonIgnore
    @JsonGetter
    public InnerBean getLab() {
        return lab;
    }

    public void setLab(InnerBean lab) {
        this.lab = lab;
    }

    @XmlTransient
    public String getLabId() {
        return lab != null ? lab.getText() : null;
    }

    @XmlTransient
    public String getLocalLabId() {
        return lab != null ? lab.getLocalCode() : null;
    }

    @XmlTransient
    public String getLabName() {
        return lab != null ? lab.getDisplayName() : null;
    }

    @JsonIgnore
    @JsonGetter
    public InnerBean getPlantType() {
        return plantType;
    }

    public void setPlantType(InnerBean plantType) {
        this.plantType = plantType;
    }

    @XmlTransient
    public String getPlantTypeId(){
        return plantType != null ? plantType.getText() : null;
    }

    @XmlTransient
    public String getPlantTypeName(){
        return plantType != null ? plantType.getDisplayName() : null;
    }

    public String getMedium() {
        return medium;
    }

    public void setMedium(String medium) {
        this.medium = medium;
    }

    public String getPlantCondition() {
        return plantCondition;
    }

    public void setPlantCondition(String plantCondition) {
        this.plantCondition = plantCondition;
    }

    public String getPlantTime() {
        return plantTime;
    }

    public void setPlantTime(String plantTime) {
        this.plantTime = plantTime;
    }

    public String getFindMethod() {
        return findMethod;
    }

    public void setFindMethod(String findMethod) {
        this.findMethod = findMethod;
    }

    public String getPlantResult() {
        return plantResult;
    }

    public void setPlantResult(String plantResult) {
        this.plantResult = plantResult;
    }

    public String getResultType() {
        return resultType;
    }

    public void setResultType(String resultType) {
        this.resultType = resultType;
    }

    public String getUnusualFlag() {
        return unusualFlag;
    }

    public void setUnusualFlag(String unusualFlag) {
        this.unusualFlag = unusualFlag;
    }

    public String getCrisisFlag() {
        return crisisFlag;
    }

    public void setCrisisFlag(String crisisFlag) {
        this.crisisFlag = crisisFlag;
    }

    public String getCrisisDesc() {
        return crisisDesc;
    }

    public void setCrisisDesc(String crisisDesc) {
        this.crisisDesc = crisisDesc;
    }
}
